With the development of the multicast technology, media streams are usually transmitted in multicast mode in a point-to-multipoint media stream transmission system. For example, the multicast technology is widely applied in the media services such as Internet Protocol Television (IPTV), web TV, mobile TV, and Digital Television (DTV).
The original video streams are oversized and inconvenient for being transmitted over the network, so the media stream transmission systems generally compress the original video streams before the transmission. The conventional video coding and compression technology works in an intraframe compression mode and an interframe compression mode to compress the original video streams significantly. However, the decoding and the play of most video frames depend on intraframe-coded frames. In other words, the media receiving device is unable to decode or play videos after the media receiving device receives interframe-coded frames but receives no intraframe-coded frame.
When the media streams are sent in multicast mode, if a new media receiving device joins a multicast group, the new media receiving device cannot play videos until it receives intraframe-coded frames of the media streams in the multicast group. Consequently, the new media receiving device that joins the multicast group may need to wait for a long time before it is able to play videos.
In order that a new media receiving device in a multicast group may start playing videos as soon as practicable, a method for sending media streams quickly in the prior art is follows: After a target media receiving device joins the multicast group, media streams are sent to the target media receiving device from the intraframe-coded frame in a current Group of Pictures (GOP) quickly. In this way, the target media receiving device may start playing videos soon. When the progress of the quickly sent media streams coincides with the progress of the normal multicast media streams, the network side starts sending the normal multicast media streams to the target media receiving device.
However, the target media receiving device joins the multicast group halfway, so the network side sends the media streams from the intraframe-coded frame in the GOP when sending the media streams to the target media receiving device, and the sending speed is higher than the speed of sending the normal multicast media streams. Therefore, the data in the video buffer of the target media receiving device is more than the data in the video buffer of the original media receiving device that receives the normal multicast media streams. When the target media receiving device plays videos at the same speed as the original media receiving device, the real-time content played by the target media receiving device is always later than the content played by the original media receiving device because the video buffer of the target media receiving device stores more data, which affects the user experience.